package com.boyan.auth.domain.holder;

import com.boyan.auth.domain.dto.UserFomDTO;


public class UserHolder {
    private static final ThreadLocal<UserFomDTO> tl = new ThreadLocal<>();

    public static void saveUser(UserFomDTO user){
        tl.set(user);
    }

    public static UserFomDTO getUser(){
        return tl.get();
    }

    public static void removeUser(){
        tl.remove();
    }
}

